package com.sams.mapper;

import com.sams.entity.School;
import com.sams.entity.SchoolExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SchoolMapper {
    int countByExample(SchoolExample example);

    int deleteByExample(SchoolExample example);

    int deleteByPrimaryKey(Integer schid);

    int insert(School record);

    int insertSelective(School record);

    List<School> selectByExample(SchoolExample example);

    School selectByPrimaryKey(Integer schid);

    int updateByExampleSelective(@Param("record") School record, @Param("example") SchoolExample example);

    int updateByExample(@Param("record") School record, @Param("example") SchoolExample example);

    int updateByPrimaryKeySelective(School record);

    int updateByPrimaryKey(School record);

	int updateStatus(School school);
	/**
	 * 根据用户id 查询它所管辖的学校
	 * @param uid
	 * @return
	 */
	List<School> selectSchoolByUid(Integer uid);
	
	/**
	 * 根据用户对应的基础表的学校id  查询它自己的学校
	 *  由于一个学校可以做多个 学校学期和学段
	 * @param uid
	 * @return
	 */
	List<School> selectSchoolByXxid(Integer xxid);
	/**
	 * 根据选择的乡镇id 查询它下面的所属学校
	 * @param zid
	 * @return
	 */
	List<School> selectSchoolByZid(Integer zid);
}